Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit c11d38d

Browse files
committed
troubleshooting step
1 parent 4a4aaad commit c11d38d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

docs/advanced-analytics/java/java-first-sample.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ This example passes the CLASSPATH parameter to provide the path to the Java file
237237
+ On Windows, change **@myClassPath** to N'C:\myJavaCode\' (assuming it's the parent folder of \pkg) before executing the query in SQL Server Management Studio or another tool.
238238

239239
```sql
240-
DECLARE @myClassPath nvarchar(30)
240+
DECLARE @myClassPath nvarchar(50)
241241
DECLARE @n int
242242
--This is where you store your classes or jars.
243243
--Update this to your own classpath
@@ -262,6 +262,8 @@ After executing the call, you should get a result set showing the two columns:
262262

263263
![Results from Java sample](../media/java/java-sample-results.png "Sample results")
264264

265+
If you get an error, check classpath. The path should include a "pkg" subfolder containing the compiled code. The parent folder, not the "pkg" subfolder, should be in classpath. The length of classpath cannot exceed the declared value (`DECLARE @myClassPath nvarchar(50)`). If it does, the path is truncated to the first 50 characters and your compiled code will not be loaded. You can increase the length if 50 characters is insufficinent. Finally, check permissions on each folder, from root to "pkg" subfolder, to ensure that the security identities running the external process have permission to read and execute your code.
266+
265267
## See also
266268

267269
+ [How to call Java in SQL Server](howto-call-java-from-sql.md)

0 commit comments

Comments
 (0)